Menu From the News
Page 8
Index
Index Page 7 | Page 9 | Nomenclature


      CSCR.BAT                -- An Interface Application to VBS Scripting.
      Extension .BAT or .VBS  -- An Interface Application for a Decompiler. 
                Updated version 
      HELP file construction  -- CSCR and DECOMP batch:
                Both the above tools was in use when writting this chapter.
                Note: Better first read the second paragraph [Extension...]
      WinXP  -- Forget what you heard, DOS batch is working with WindowsXP.
                Equal.bat



Interface application to scripting

  The below batchfile is tested in Win98. It's an inspiration of
  my "newbee/obsolete outdated stuff". The motivation was that I
  saw someone uploaded WSH solutions along with CALL CScript but
  without using the extension EXE.

  Unless Horst Schaeffer ask me to remove my batch file, it will
  remain here. BTW: Option numb 3 below act different, depending
  on whether you have loaded DOSKEY.COM or not loaded that file.

: Begin batchfile by Benny Pedersen, [150 lines and 6497 bytes.]
: CSCR.BAT                           [Usage: Drag & drop a file]
@ echo off
If %8%1.%2.%3%9 == (MakeScr.echo.prompt:$) goto %1.
  if exist %temp%.\test.txt del /p %temp%.\test.txt
Cls
  if exist %temp%.\test.txt goto EOF
  if not exist; %1 goto:EOF goto EOF

  %ComSpec%/c%0 MakeScr> %temp%.\CSCRIPT.SCR echo prompt:$ f n o r ( )
  echo:Cscript.com v2.21 by Horst Schaeffer> %temp%.\CSCRIPT.COM
  debug                < %temp%.\CSCRIPT.SCR %temp%.\CSCRIPT.COM > NUL
  erase                  %temp%.\CSCRIPT.SCR

echo.
echo. 0/[Esc] to quit.
echo.
echo.   1: DEBUG mode:               e100 "GIF89a "0 " "0 B3 0 0
echo.   2:   &       No tear lines
echo.   3:   &       Width 10...79
echo.
echo.   4: ASM mode: DB lines,       a db "GIF89a "0 " "0 B3 0 0
echo.
echo.   5: Hex only:                 e100 47 49 46 38 39 61 20 0
echo.
echo.   6: XXencoded                 begin 644  nFoZ4C1ZV6++U+9A
echo.   7: UUencoded                 begin 644  S1TE&.#EA(``@`+,
echo.
echo.   8: XXencoded +DEBUG header   e100 FC "+"ED BE 82 1 B9 80 g=100
echo.   9: UUencoded +DEBUG header   begin 644  S1TE&.#EA(``@`+,
echo.
echo.   A: Herbert alike             echo
echo.

  choice /c10234567891111111A>nul
For %%D in (0 2 3 4 5 6 7 8 9 A) do if errorlevel 77%%D goto %%D

: 1
  %temp%.\CSCRIPT.COM %1 > %temp%.\test.txt /D
Goto 0

: 2
  %temp%.\CSCRIPT.COM %1 > %temp%.\test.txt /N
Goto 0

: 3
  choice /n/c1234567 Input width, [10;79]: % %
  for %%D in (1 2 3 4 5 6 7) do if errorlevel %%D set W=%%D
  echo.
  set cmdline=                   
  echo exit%cmdline%%cmdline%%cmdline%|%comspec%>nul
  choice /n/c§0123456789
  for %%D in (0 1 2 3 4 5 6 7 8 9) do if errorlevel 77%%D set W=%W%%%D

  %temp%.\CSCRIPT.COM %1 > %temp%.\test.txt /W%W% /N
For %%D in (set goto:0) do %%D W=

: 4
  %temp%.\CSCRIPT.COM %1 > %temp%.\test.txt /A /N
Goto 0

: 5
  %temp%.\CSCRIPT.COM %1 > %temp%.\test.txt /H /N
Goto 0

: 6
  %temp%.\CSCRIPT.COM %1 > %temp%.\test.txt /X /N
goto 0

: 7
  %temp%.\CSCRIPT.COM %1 > %temp%.\test.txt /U /N
Goto 0

: 8
  %temp%.\CSCRIPT.COM %1 > %temp%.\test.txt /XD/N
Goto 0

: 9
  %temp%.\CSCRIPT.COM %1 > %temp%.\test.txt /UD/N
Goto 0

: A
  echo Ask Herbert
Pause

: 0
  del %temp%.\CSCRIPT.COM
Cls

If not exist %temp%.\test.txt goto EOF
  Explorer.exe/e,./root,,/select,%temp%.\test.txt
Goto EOF
______________________________________________________________________
:MakeScr
%2:e100 E9 "#"4 'Option?'D A 'CSCRIPT source '3E ' scriptfile [option'
%2:e12F 's]'D A 'Option  /D'9 'DEBUG mode (default)'D A 9 '/X'7C 'U[D'
%2:e15B ']'9 'XX'7C 'UUencoded [with DEBUG header]'D A 9 '/H'9 'hex o'
%2:e188 'nly'D A 9 '/A'9 'ASM mode (DB lines)'D A 9 '/[W]n'9 'width n'
%2:e1B4 '=10..79'D A 9 '/N'9 'no tear lines'D A 'DEBUG/XX/UU script g'
%2:e1E4 'enerator, ver. 2.21 by Horst Schaeffer' 0 D A 'File? (max:45'
%2:e21A ' KB)'D A 'rCX'0 'g=100'D A 'w'0 '  CRC32='0 ' * CSCRIPT'0 'b'
%2:e242 'egin 644 '0 D A 'end'0 'D'1 'X'2 'U'4 'A'8 'H'10 'N F'0 0 'W'
%2:e262 '+'C9 '+'D2 89 C8 B5 8 D1 EA D1 D8 73 07 81 F2 B8 ED '5 '83 FE
%2:e278 CD 'u'EF AB 8B C2 AB 'A'81 F9 00 01 'r'DE '_'89 E9 B8 FF FF 99
%2:e28D E3 18 8B D8 AC '1'C3 3 DB 3 DB 88 E0 8A E2 88 F2 2A F6 '3'1 33
%2:e2A3 'Q'2 E2 E8 F7 D0 F7 D2 C3 AC 84 C0 't'3 AA EB F8 C3 BF B3 6 E8
%2:e2B9 F1 FF BA B3 6 B8 D A AB 8B CF ')'D1 BB 1 0 B4 40 CD 21 's'3 E9
%2:e2D0 'N'2 89 D7 C3 10 3C 10 'r'B '*'E4 F6 '6'D5 2 E8 2 0 86 E0 4 30
%2:e2E7 3C '9v'2 4 7 AA C3 84 FF 't'5 8A C7 E8 DE FF 8A C3 EB DE 8B CF
%2:e2FE 3 E '^'2 F6 6 '`'2 8 't'6 B8 'db'AB EB C B0 'e'AA 8D 9C 0 1 2B
%2:e317 DA E8 D4 FF B0 20 AA 8B D9 '+'DF 'v'CA 8A F8 8A 4 F6 6 '`'2 10
%2:e32D 'u,'3C ' r('3C 22 't$'3C 40 't'20 3C 7F 's'1C 80 FF 22 't'A 80
%2:e345 FB 1 't'A5 80 FB 2 'v'D B0 22 '8'C7 'u'3 'O'EB 1 AA A4 EB F 80
%2:e35C FB 1 'u'4 3C 10 's'8A AC E8 'n'FF B0 20 AA 'Mu'B0 C3 'V'B8 'n'
%2:e372 20 AB 8B '6'B1 6 E8 '='FF F6 6 '`'02 8 't'06 B0 'a'AA E8 '3'FF
%2:e388 'Z'89 D6 E8 'n'FF 80 '}'FF ' u' 01 'OR'E8 22 FF 'Z'85 ED 'u'ED
%2:e39E F6 6 '`'02 8 't'03 E8 13 FF C3 'U'BE F3 16 E8 BF FF BE 20 2 E8
%2:e3B4 FF FE '['E8 '5'FF E8 FE FE B0 'w'AA E8 F8 FE B0 'q'AA C3 BD 82
%2:e3C9 0 F6 6 '`'02 4 't'10 'W'BF '/'6 BE '\'6 B9 13 0 F3 A4 '_'BD 76
%2:e3E0 0 BE DA 5 E8 88 FF BE '$'02 E8 BF FE BB 82 1 E8 FC FE E8 C5 FE
%2:e3F6 B0 'q'AA E9 BF FE '`a!`'BE 'A'02 E8 A6 FE 8B '6'B1 06 E8 AB FE
%2:e40D BE 'Q'6 B9 5 0 BF 'o'6 F6 6 '`'02 4 74 5 B1 2 BE FC 3 AD AA FE
%2:e425 C0 ':'C4 'r'F9 E2 F6 BE F3 16 BF B3 06 BB 'o'6 8B E AF 6 ';'CD
%2:e43B 'v'2 89 E9 '+'E9 88 C8 D7 AA E3 1C '*'C0 B2 6 84 ED 'u'A '*'E4
%2:e451 E3 4 8A '$FI'B5 8 D1 C0 FE CD FE CA 'u'EA EB E0 E8 'U'FE 85 ED
%2:e468 'u'C5 A0 'o'6 AA BE 'L'2 E9 '8'FE F6 6 '`'02 6 't'12 B9 4 3 A1
%2:e47F '^'2 'H'F6 F1 '(&^'2 F6 E5 A3 AF 6 BF B3 6 F6 6 '`'2 ' u'11 B8
%2:e498 2D 2B AB AB 8B E '^'2 83 E9 4 F3 AA E8 13 FE C3 '+'C9 8 E '`'2
%2:e4AF AC 3C ' t'FB 'N'3C '/u'EF 'F'80 3C '0r'EC AC 3C '?tG$'DF BB 52
%2:e4C8 2 ':'7 'u'5 A 'O'1 EB E8 83 C3 2 81 FB '^'2 'r'EE 3C 'Wt'1 'N'
%2:e4E0 '+'C0 B7 A 8A 1C 80 EB 30 ':'DF 73 7 'F'F6 E7 0 D8 's'F0 '8'F8
%2:e4F6 'r'B 3C 'Ov'2 B0 'O'A2 '^'2 EB B7 B9 A 1 BA 3 1 EB E B9 1 1 BA
%2:e50F C 1 EB 6 B9 13 0 BA D 2 BB 2 00 B4 40 CD '!'B0 FF B4 'L'CD '!'
%2:e526 BE 81 0 E8 7D FF BA B3 16 89 D7 89 FB AC 3C 20 'v'19 3C '/t'15
%2:e53C 3C 'ar'6 3C 'zw'2 '$'DF AA 3C ':t'E6 3C '\t'E2 EB E2 'N;'FB 74
%2:e555 B5 89 1E B1 6 B0 0 AA '*'C0 B4 '='CD 21 'r'AE BA F3 16 B9 1 B4
%2:e56B 8B D8 B4 '?'CD 21 'r'A0 ';'C1 's'9C 85 C0 't'98 89 C5 B4 3E CD
%2:e580 21 E8 25 FF E8 ED FE BE F3 16 E8 D4 FC 'P'52 F6 6 '`'2 6 't'11
%2:e596 'U'F6 6 '`'2 1 't'3 E8 '&'FE ']'E8 '['FE EB 3 E8 FF FD BE '-'2
%2:e5AD E8 FC FC B9 2 0 '['8A C7 E8 '!'FD E8 3C FD E2 F5 BE '6'2 E8 E8
%2:e5C3 FC BE F2 1 E8 EE FC E8 C0 FE BB 01 00 B4 3E CD '!*'C0 E9 'I'FF
%2:e5D9 90 FC '+'ED BE 82 01 B9 80 FD B4 '?U[VZ'CD '!r`PY'F7 D8 'SPV['
%2:e5F5 AC 3C 'b'E0 FB 'uG'3C A AC 'u'FB E8 '+'0 84 D2 't;*'F6 1 D5 B6
%2:e60D 1 B1 4 AC 3C ' v'E7 E8 17 0 2 D2 2 D2 B5 6 3 D2 's'5 88 '7C'B6
%2:e626 1 FE CD 'u'F3 E2 E3 EB DF 8A D0 BF 'w'1 2 'U'FF '*'15 'r'07 AE
%2:e63C 'r'4 AE 's'F3 C3 'XZ['B9 FF FF B8 1 'B'CD '!UY'CC 0 '+,-.0:A['
%2:e659 'a'7B FF 8A D0 80 EA 20 76 0A 80 FA 40 'r'4 'u'03 B2 0 C3 'PX'
%3:rCX$_056f$_w0100$_q$_$L$L$L'CSCRIPT.COM'$G$G$G!$_CRC32 = BE8E5DA2$_
%4%6%7:%%%6 i%5 %8%5 %4%4%9 d%6 %2:%6%%%6
:EOF


Extension .BAT or .VBS -- [An Interface Application for a Decompiler].

  InputBox "Test to load a helpfile",,,,, "named file.HLP", 5128

The "InputBox" in the VBS language take an argument for a HLP file, so
I just visit a Website named [http://www.helpmaster.com/index.htm] and
downloaded "helpdc21.zip" by Manfred Winterhoff. What I wanted was: to
figure out of any VBS syntax using the HELPDECO decompiler to dissects
a help file. The HELPDECO decompiler dissects HLP files of Windos 3.0,
3.1, 3.11 and 95 and many MVB multi media viewer titles into all files
required for a rebuild using the appropriate help compiler HC30, HC31,
HCP, HCW, HCRTF, WMVC, MMVC or MVC. I just used such decompilers on my
Win98 computer. My motivation/reson is I'm in progress of learning the
VBS language, so I examing that stuff. Since VBS can be used in WinXP;
XP is a declaration by Mickeysooft, so wee can't always use our better
batch solutions named with the extension BAT.

Below is a batch file and it works like this,

1.
If a file is dragged & dropped, then a folder named "%temp%\work\test"
would be created. If that folder already exists, it is left unchanged.

2.
Then a little COM file is created. That ~.COM file is used to grap the
screen from line numb 0...24, which is all the lines. The last section
of the ~.com file is a comment between two percent marks to be ignored
(unless you want to know where I keep the COM source.)

3.
Then the PROMPT is set (to a bit HTML code) which is displayed on CON.

4.
The output from the decompiler goes to "%temp%\work\test\decomp.html".

5.
See number 3 above.

6.
The COM file is now in use. The remaining output of the decompillation
by HELPDECO would be grapped.

7.
If the decompilled HLP file contain a [MAP] section along with numbers
which could be used as the last argument to the VBS/WSH InputBox, then
I want to know.

8.
Forget the above, just use it. All created files goes to ONE folder so
the only thing to remember and to do is, that you can delete any files
from that folder that you don't want to keep.

Benny Pedersen,
ARGHHH: What I better want to show is this 1-2-3, SMART solution:

  For %%f in (xcopy.exe" nul" call cd) do %%f>nul "%temp%.\work\test\"

: 1. Create a folder (if not existing).
: 2. Go drive.
: 3. Go folder.

but I suddenly created An Interface Application for a Decompiler:


@echo off
%2 if exist "%1" "%0" "%1" goto:decompile into "%temp%\work\test"
echo.
echo. Error:    The decompiler is missing a HLP file.
echo.
echo. Usage:    Drag & drop a file.HLP that you want to decompile
echo.           onto the icon of this batch file "%0"
echo.
for %%c in (echo." Press any key..." "pause|nul" cls exit) do %%c

:decompile
for %%f in (xcopy.exe" nul" call cd) do %%f > nul %4\
rem> ~.com
echo Bj@jzh`0X-`/PPPPPPa(DE(DM(DO(Dh(Ls(Lu(LX(LeZRR]EEEUYRX2Dx=>>~.com
echo 0DxFP,0Xx.t0P,=XtGsB4o@$?PIyU!WvX0GwUY Wv;ovBX2Gv0ExGIuht6>>~.com
echo ?A}IKuNWKg}1\H?w?FgFwjh[thAtg?_QFw?GAC~AHOpeIe=b?GCooAt`EE>>~.com
echo _SFDGQs_{O=HAwtH}1nHgzLDFBFFISXxJt]?sECyFGVhAozxHmL?@opB`K>>~.com
echo EFZNUAAo}H@SuN1_{ECCRqoCvx{OokN?IZjLFB@{AAE?j@wre~aN@AA_?W>>~.com
echo zBzBu`B?WoB??o0%//2dos.homepage.dk/batutil/help/FDISK.HTM%>>~.com

for %%c in (prompt:$LPRE$G$D&#32";"$B&#32";"$T$H$H echo:on " ") do %%c
@echo off

set cmdline="C:\Dokumenter\titanium\HLP Decompiler\helpdc21"
if not exist %cmdline%\helpdeco.exe goto:eof MODIFY & DELETE THIS LINE
%cmdline%\HELPDECO.EXE %1 /y> decomp.html

prompt $L/PRE$G$LHR
echo on
>
@echo off

~>>decomp.html 0 24
cls
echo.
find.exe >>>>>>>> nul/i "Creating [MAP] section"<decomp.html
if Not errorlevel 1 echo. Found a [MAP] section.
if errorlevel 1 echo. Not Found a [MAP] section.

copy/b>nul "Total LOG.html" + decomp.html = "Total LOG.html"

for %%c in (del:~.com echo. pause cls "explorer %4\") do %%c
find.exe " Warning" > nul < decomp.html
if not errorlevel 1 Notepad decomp.html

:: Link: WSH on the UseNet -- A VBS reply by Torgeir Bakken.
:: Note: The below HLP_DECOMP.BAT file is an updating.


The "Help Work Shop" by Mickeysooft would like to modify the HPJ file, so, here's an updated version, @ echo off %2 if exist "%1" "%0" "%1" goto:MakeFiles Decompile "%temp%\work\test" echo. echo. Error: The decompiler is missing a HLP file. echo. echo. Usage: Drag & drop a file.HLP that you want to decompile echo. onto the icon of this batch file "%0" echo. for %%c in (echo." Press any key..." "pause|nul" cls exit) do %%c : MakeFiles for %%f in (xcopy.exe" nul" call cd) do %%f > nul %4\ echo Bj@jzh`0X-`/PPPPPPa(DE(DM(DO(Dh(Ls(Lu(LX(LeZRR]EEEUYRX2Dx=> L.com echo 0DxFP,0Xx.t0P,=XtGsB4o@$?PIyU!WvX0GwUY Wv;ovBX2Gv0ExGIuht6>>L.com echo ?A}IKuNWKg}1\H?w?FgFwjh[thAtg?_QFw?GAC~AHOpeIe=b?GCooAt`EE>>L.com echo _SFDGQs_{O=HAwtH}1nHgzLDFBFFISXxJt]?sECyFGVhAozxHmL?@opB`K>>L.com echo EFZNUAAo}H@SuN1_{ECCRqoCvx{OokN?IZjLFB@{AAE?j@wre~aN@AA_?W>>L.com echo zBzBu`B?WoB??o0%//2dos.homepage.dk/batutil/help/FDISK.HTM%>>L.com for %%c in (prompt:$LPRE$G$D&#32";"$B&#32";"$T$H$H echo:on " ") do %%c @echo off L>decomp.html 1 1 cls %comspec%/c%0>>decomp.html %1 goto:%3 decomp.html %4 cls echo. find.exe >>>>>>>> nul/i "Creating [MAP] section"<decomp.html if Not errorlevel 1 echo. Found a [MAP] section. if errorlevel 1 echo. Not Found a [MAP] section. for %%c in (erase:L.com echo. pause cls "explorer %4\") do %%c ::find.exe " Warning" > nul < decomp.html ::if not errorlevel 1 Notepad decomp.html @ exit :Decompile set cmdline="C:\Dokumenter\titanium\HLP Decompiler\helpdc21" %cmdline%\HELPDECO.EXE %1 /y echo =========== for %%c in (*.HPJ) do type %%c prompt $===========$_Log. The last 25 output of the decompiler echo on , L = 0 24; @echo off prompt $L/PRE$G$LHR echo on > @echo off

HLP file construction

I have just wrote my very first HLP file (9.037 bytes).
Each time when I tried to compile a RTF format into a HLP file I then saw
that NOT two files was identically. The contents was the same but the HLP
files created was different, depending on what button that was pressed to
perform the compiling, hmmm.
When I compiled a HLP file that was decompiled and then compiled again, I
then noticed that the file was different from the previous one but anyhow
with the same contents. That you should now. Moreover I noticed an useful
usage about the decompiler, namely that it can be used to convert a large
picture in a HLP file to the WMF format and that the original RTF file (I
used MS-Word) was compressed from 9.501 bytes to only 2.205 bytes! So, if
you got a RTF file that you want to compress, then make a HLP file & then
decompile it, so, you'll end up with a very small RTF document containing
the same contents as you wrote it. ;-)

The below batch file would simply create "my first HLP file" using Debug.
If you want to create HELP files, then you should learn how to make three
footnotes: #$K. Tips: When working with the RTF file format for HELP file
construction, then select the "Show Foot Notes" from whitin your MS-Word.

Benny Pedersen,
PS. The below MakeHLP.BAT contains 95 lines in 6.317 bytes,
    anyway, the HELP file created is more than 9.000 bytes,

@%[ Line 01 ]% if exist %0.bat %0.bat
@%[ Line 02 ]% find.exe /v "@%%[ Line 0" <%0 | debug
@%[ Line 03 ]% for %%c in (echo cls exit) do %%c off
nVBS_WSH.HLP
f100L234d 0
e100 '?_'3 0 C6 2 0 0 FF FF FF FF 'M#'0 0 B6 2 0 0 AD 2 0 0 0 'lp'1 0 8
e121 8 1 10 'O'3 'O'3 '('7 ' '5 0 0 15 0 0 0 0 0 0 0 88 1 0 9 0 0 3 CA 1 4
e141 82 'B'1 4 0 81 4 3 0 85 3 1 8 0 5 3 0 82 B 2 4 0 81 5 3 0 87 C 2 20
e160 ' '0 4 3 0 85 7 1 4 0 'f'3 0 85 'C'F 86 0 EE 3 0 83 20 0 20 5 0 83 20
e17E ' '5 0 81 '('3 0 81 20 3 0 81 20 3 0 83 1 0 1 5 0 81 80 B 0 81 2 3 0 81
e19C 2 7 0 3 FF 6 0 F6 F F0 0 0 7F FE 0 1 FF FF 80 3 FF FF C0 7 FF FF E0 F
e1B8 FF FF F0 1F FF FF F8 1F FF FF F8 3F FF FF FC 3F FF FF FC 3F FF FF FC 7F
e1D0 FF FF FE 7F FF FF FE 7F FF FF FE 7F FF FF FE 7F FF FF FE 7F FF FF FE 7F
e1E8 FF FF FE 7F FF FF FE 3F FF FF FC 3F FF FF FC 3F FF FF FC 1F FF FF F8 1F
e200 FF FF F8 F FF FF F0 7 FF FF E0 3 FF FF C0 1 FF FF 80 0 7F FE 0 0 F F0 5
e21c 89 'B'1 0 0 'C'F C6 0 88 3 0 83 20 0 20 5 0 83 20 0 20 5 0 81 '('3
e238 81 ' '3 0 81 20 3 0 83 1 0 4 5 0 82 80 2 A 0 81 10 3 0 81 8 9 0 96 FF
e256 '$'BF F8 0 '3'CC FF 0 0 FF FF 0 99 FF FF 0 CC FF FF 0 3 FF 81 0 3 FF 81
e272 3 FF 81 0 3 FF 81 0 3 FF 81 0 3 FF 81 0 3 FF 81 0 3 FF 81 0 3 FF 81
e28E 16 FF 4 'D'A FF 81 '$'6 'D'81 'O'7 FF 81 '$'8 'D'81 'O'6 FF A 'D'5 FF
e2A8 81 '$'A 'D'81 'O'4 FF C 'D'3 FF 81 '$'5 'D'83 0 0 4 4 'D'84 'O'FF FF 24
e2C3 4 'D'84 40 11 11 10 4 'D'83 'O'FF FF 5 'D'81 1 3 11 81 4 4 'D'82 FF FF
e2DD 4 'D'86 40 1 11 1 11 0 4 'D'82 FF FF 4 'D'81 40 5 0 4 'D'82 FF '$'4 44
e2F8 81 40 5 0 4 'D'82 'O$'4 'D'81 40 5 0 4 'D'82 'O$'4 'D'81 40 5 0 4 'D'82
e315 'O$'4 'D'81 40 5 0 4 'D'82 'O$'5 'D'4 0 81 4 4 'D'82 'O$'5 'D'4 0 81 4
e333 4 'D'82 'O$'5 'D'81 40 3 0 5 'D'82 'O$'E 'D'82 'O'FF E 'D'82 FF FF 3 44
e34F 88 40 0 4 'DD'40 0 4 3 'D'82 FF FF 3 'D'88 4 'D'40 'DD'4 'D'40 3 'D'85
e36B FF FF '$D'40 3 'D'82 4 40 3 'D'86 4 'DO'FF FF '$'5 'D'82 4 40 5 'D'81
e386 'O'3 FF C 'D'4 FF 82 '$'40 8 'D'82 4 'O'5 FF 82 'D'0 6 'D'82 0 'D'6 FF
e3A1 8A '$D'0 0 'DD'0 0 'DO'7 FF 81 '$'6 'D'81 'O'A FF 4 'D'16 FF 81 4 3
e3BE 85 7 1 1 0 3 5 0 '/'4 0 0 26 4 0 0 4 ';)'2 4 0 4 'z4'
e3Eb FF FF 1 0 1 0 A 0 0 0 82 3 A 0 FF FF FF FF '|CON'
e401 'TEXT'0 1E 1B 0 0 '|CTXOMAP'0 'k'E 0 0 '|FONT'0 C3 D 0 0 '|KWBTREE'0 C0
e42B E 0 0 '|KWDATA'0 96 E 0 0 '|KWMAP'0 AF E 0 0 '|SYSTEM'0 F5 6 0 0 '|TOP'
e455 'IC'0 92 7 0 0 '|TTLBTREE'0 EF 12 0 0 '|bm0'0 10
e7f5 9D 0 0 0 94 0 0 0 0 6c 3 21 0 1 0 F5 92 EE 3c 0 0 1 0 8 0 'VBA/WSH'0 3
e818 4 0 0 0 0 0 6 0 5A 0 7F 2 0 0 0 0 0 0 0 0 0 0 'main'
e86E C2 1 EE 2 0 0 0 0 0 0 0 0 0 0 9 0 A
e888 6 4 B 0 4 0 0 0 0 EE '1'6 0 0 '('6 0 0 0 FF FF FF FF C 0 0 0 0 0 0 0 31
e8Af FF FF FF FF '='0 0 0 '1'0 0 0 2 'U'1 0 0 FF FF FF FF FF FF FF FF
e8Cc FF FF FF FF '='0 0 0 'a'1 0 0 '4'0 0 0 5 0 0 0 C 0 0 0 71
e8E8 '/'0 0 0 ' .'80 C 0 80 0 0 0 8 80 0 0 86 22 8 80 2 0 0 0 0 80 1 0 82 FF
e90c F0 0 0 0 B2 0 0 0 '='0 0 0 'a'1 0 0 '>'0 0 0 ' J'80 'e'1 0 80
e92b 80 1 0 82 80 2 0 82 82 82 82 82 82 82 80 3 0 80 2 0 82 82 80 3
e944 80 2 0 82 82 FF 0 'Welcome to my page about VBS'0 0 0 0 'Contents:'
e975 '                    Hex'0 '                    Oct'0 0 0 'Benny Peder'
e9B2 'sen, '0 'b.pedersen'40 'get2net.dk'0 0 0 'Homepage:       '0 'http://'
e9E8 '2dos.homepage.dk'0 0 0 0 '='0 0 0 C 0 0 0 'q'0 0 0 9E 1 0 0 '1'0 0 0 2
eA11 'G'1 0 0 FF FF FF FF FF FF FF FF 1 0 0 0 FF FF FF FF 9E 1 0 0 A8 2
eA2D 'Hex function'A 1 0 0 D8 0 0 0 'a'1 0 0 A8 2 0 0 '2'0 0 0 ' 2'80 B1 1
eA53 80 0 0 0 0 80 1 0 82 80 2 0 82 82 82 82 82 82 82 82 82 82 82 FF 0 'Hex'
eA72 '  Dim MyDec, MyHex'0 '  MyDec = 2147483647'0 '  MyHex = Hex(MyD'
eAAB 'ec)'0 0 '  InputBox MyDec,,MyHex,X,Y'0 "  msgbox Hex(1.49)        '1"
eAE9 "  msgbox Hex(1.50)        '2"0 "  msgbox Hex(blank)       '0"0 '  msg'
eB28 "box &h10 +1          '17"0 0 0 '='0 0 0 C 0 0 0 9E 1 0 0 E5 2 0 0 31
eB57 2 A 1 0 0 FF FF FF FF FF FF FF FF 2 0 0 0 FF FF FF FF E5 2 0 0 B2 3
eB74 'Oct function'CD 0 0 0 9C 0 0 0 A8 2 0 0 B2 3 0 0 '1'0 0 0 ' 0'80
eB97 '9'1 0 80 0 0 0 0 80 1 0 82 80 4 0 82 80 2 0 82 82 82 82 82 82 FF 0 4f
eBB3 'ct'0 0 0 0 '  inputbox Oct(2147483647),'22 22 0 '  msgbox Oct(1.49)  '
eBEB "      '1"0 "  msgbox Oct(1.50)        '2"0 '  msgbox Oct(blank)      '
eC2A " '0"0 "  msgbox &o10 +1          '9"0 0 0 'J'0 0 0 19 0 0 0 E5 2
eC59 FC 3 0 0 '1'0 0 0 2 'E'2 0 0 FF FF FF FF FF FF FF FF 3 0 0 0 FF FF FF
eC75 FF FC 3 0 0 F7 5 0 0 'How I wrote this HLP file'FB 1 0 0 B9 1 0 0 B2 3
eCA3 F7 5 0 0 'B'0 0 0 ' R'80 's'3 0 80 0 0 0 0 80 1 0 82 80 2 0 82 82
eCBF 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82
eCD7 82 FF 0 'How did I wrote this HLP file'0 0 0 '#'0 '$ Topics used by th'
eD0F 'e Search Menu, dialogBox(3)'0 'K Keywords is only used of the Index M'
eD51 'enu, dialogBox(2)'0 ' '0 'The first thing I did was that I created th'
eD90 'is file named vbs_wsh.rtf, then'0 'I wrote a file named vbs_wsh.hpj'
eDD2 '[WINDOWS]'0 'main='22 22 ',(0,0,450,750),,,(0,0,0)'0 0 '[OPTIONS]'
eE07 'TITLE=VBA/WSH'0 'CONTENTS=100'0 'ERRORLOG=HELP.ERR'0 'REPORT=ON'0 'WA'
eE40 'RNING=3'0 'COMPRESS=OFF'0 0 '[FILES]'0 'vbs_wsh.rtf'0 0 '[MAP]'0 '100'
eE74 '=100'0 '200=200'0 '300=300'0 '400=400'0 0 '1'0 0 0 0 0 0 0 FC 3 0 0 FF
eE9F FF FF FF '1'0 0 0 2 18 0 0 0 FF FF FF FF FF FF FF FF 4 0 0 0 FF FF FF
eEBA FF FF FF FF FF FF FF FF FF A8 0 0 0 9F 0 0 0 0 3 0 5 0 8 0 'h'0 'Times'
eED9 ' New Roman'0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 'Arial'
eF14 'Andale Mono'
eF34 1 14 3 1 0 1 1 0 1 1 0 1 28 3 1 0 1 1 0 1 1 0 0 14 1 2 0 1 1 0 1 1
eF55 4 14 1 2 0 0 0 FF 1 1 0 0 18 1 2 0 1 1 0 1 1 0 2b 0 0 0 22
eF74 4 0 64 0 0 0 0 0 0 0 C8 0 0 0 B8 0 0 0 2c 1 0 0 90 1 0 0 90 1 0 0 2c 2
eF96 19 0 0 0 10 0 0 0 0 B8 0 0 0 90 1 0 0 B8 0 0 0 90 1 0 0 11 0 0 0 8
eFb8 1 0 0 0 0 0 0 0 2F 4 0 0 26 4 0 0 0 ';)'2 0 0 4 46 '24'
eFe5 FF FF 1 0 1 0 3 0 0 0 CB 3 3 0 FF FF FF FF 'function'0 2
e1006 'hexadecimal'0 1 0 8 0 0 0 'octal'0 1 0 C
e13EF 2F 8 0 0 26 8 0 0 0 ';)'2 0 0 8 'Lz'
e1414 FF FF 1 0 1 0 5 0 0 0 AE 7 5 0 FF FF FF FF 0 0 0 0 0 B8 0 0 0 'Hex '
e1433 'function'0 90 1 0 0 'Oct function'0 ','2 0 0 'How I wrote this HLP f'
e1467 'ile'0 E5 3
e1C1E 2f 8 0 0 26 8 0 0 0 ';)'2 0 0 8 'L4'
e1C43 FF FF 1 0 1 0 4 0 0 0 D8 7 4 0 FF FF FF FF F1 8
e1C5d '*'10 0 0 B8 0 0 0 'c'17 0 0 90 1 0 0 9C 1E 0 0 2c 2
rcx
234d
w
q

:: Notes: The numbers that can be used as the last argument for the InputBox
::        is here 100, 200, 300 or 400.



WinXP

Forget what you heard, DOS batch is working under WindowsXP.

I send a VBS solution (yesterday) using DOS batch to the WSH
Group and someone said that it *won't* work under WinXP, so,
I went to the local bank and then into a softwareShop to get
a WindowsXP. I installed it today, (I have other HD) and saw
that the DOS Batch is working.

Benny Pedersen,
PS.: Equal.bat is tested under OS WinNT: XP and in Win9X.
BTW. Some modifications such as: "drag'n'drop" instead of
"drag & drop" was needed (XP don't like the character &).

  Equal.bat  (54 lines).

 Win9X/XP



@ echo off
  echo.
  IF NOT %2. == . goto msg          [two files isn't allowed]
  if not exist %1 goto:msg goto msg [a blank argument either]
  if not exist %temp%.\COMP~TMP.BAT goto first
  call         %temp%.\COMP~TMP.BAT
  if %first%.==%1. echo. A drag'n'drop of the same filename was performed.
  if %first%.==%1. echo.
  if %first%.==%1. echo.
  if %first%.==%1. echo.      Press any key to quit:
  if %first%.==%1. set first=
  if %first%. == . del %temp%.\COMP~TMP.BAT
  if %first%. == . pause>nul
  if %first%. == . cls
  if %first%. == . goto eof
  echo @prompt set noDiff=>       %temp%.\COMP~TMP.BAT
  fc.exe %1 %1 | find.exe "FC:">> %temp%.\COMP~TMP.BAT
  %comspec% /c %temp%.\COMP~TMP.BAT|find.exe "=F">%temp%.\COMP~TMB.BAT
  cls
  echo.
  echo.%first%
  echo.%1
  echo.
  echo.
  echo exit|%comspec%/kprompt rcx$_14$_w$_q|debug %temp%.\COMP~TMB.BAT>nul
  call %temp%.\COMP~TMB.BAT
  fc.exe/b %first% %1|find.exe "%noDiff%">nul
  if not errorlevel 1 echo.      Files is Identically.
  if not errorlevel 1 goto end
  echo.      Files is NOT Identically.
  echo.
  set c=______
  echo.......%c%%c%%c%%c%_%c%%c%%c%%c%_%c%%c%%c%%c%
  fc/a %first% %1 /lb1|find/v /n "***** "|find/v /n "***** "|find "[4]"
  echo.......%c%%c%%c%%c%_%c%%c%%c%%c%_%c%%c%%c%%c%
  SET C=
: end
  for %%c in (echo. echo. echo."     Press any key to quit: ") do %%c
  for %%c in (noDiff first) do set %%c=
  del %temp%.\COMP~*.BAT
  PAUSE>NUL
  cls
  goto eof
: first
  echo set first=%1> %temp%.\COMP~TMP.BAT
  goto eof
: msg
  echo. To compare two files, drag'n'drop the first file on top
  echo. of the batch icon, then drag and drop your second file.
  echo.
  echo.      Press any key to quit:
  pause>nul
  cls
: eof

      Microsoft has changed a lot in Windows NT, so you can't
      get an Exit code returned to the calling batch program.
      So, if we sometimes also want to CALL Equal.bat instead
      of performing two drag & drop each time, modify it like
      this: Prefix line numb 3, 36 and 41 with the following:
        IF NOT %2.==:.    
      Then CALL the Equal.BATch file with a colon (:) used as
      a second argument, like this:

        call Equal.bat file1
        call Equal.bat file2 :
        if not %c%.==. echo NOT Identically.
        if     %c%.==. echo     Identically.
        set c=


  Links:
   Aquiles
   Equal.zip


 

-Top- Page 7 | Page 9 | Nomenclature